package com.carol.lmsbe.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 创建易耗品领用记录请求
 */
@Data
public class ConsumableReceiveCreateRequest {

    @NotBlank(message = "物品名称不能为空")
    private String itemName;

    private String specification;

    @NotBlank(message = "单位不能为空")
    private String unit;

    @NotNull(message = "领用数量不能为空")
    @Positive(message = "领用数量必须大于0")
    private Integer quantity;

    @NotNull(message = "单价不能为空")
    @Positive(message = "单价必须大于0")
    private BigDecimal unitPrice;

    @NotNull(message = "领用日期不能为空")
    private LocalDate receiveDate;

    @NotNull(message = "用途不能为空")
    private String purpose;

    @NotNull(message = "是否计划内不能为空")
    private Boolean isPlanned;

    private Long planId;

    private String receiverName;

    private String receiverPhone;

    private String remark;
}
